package org.example.enums;

/**
 * @ Author     ：hanxi
 * @ Date       ：Created in 23:37 2024/10/10
 * @ Description：更新缓存类型枚举
 */
public enum RenewCacheTypeEnum {

    VIDEO(1,"系统视频"),TRANSACTION_PRODUCT(2,"域名交易"),NEWS(3,"最新资讯"),
    FRIEND_SHIP_LINK(4,"友情链接"),OFFICIAL_ACCOUNT(5,"公众号")
    ,COOPERATIVE_PARTNER(6,"合作伙伴"),BOTTOM_TEXT(7,"底部文案"),AUTHENTICATION_ICON(8,"认证icon");
    private int id;

    private String desc;

    RenewCacheTypeEnum(int id, String desc) {
        this.id = id;
        this.desc = desc;
    }

    public static RenewCacheTypeEnum getEnum(int id){
        for (RenewCacheTypeEnum renewCacheTypeEnum: RenewCacheTypeEnum.values()){
            int enumId = renewCacheTypeEnum.getId();
            if(id == enumId){
                return renewCacheTypeEnum;
            }
        }
        return null;
    }

    public int getId() {
        return id;
    }

    public String getDesc() {
        return desc;
    }
}
